<?php
/**
 * Module Template:
 * Loaded by product-type template to display additional product images.
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_modules_additional_images.php 3215 2006-03-20 06:05:55Z birdbrain $
 */
  require(DIR_WS_MODULES . zen_get_module_directory('additional_images.php'));
 ?>
 <?php
 if ($flag_show_product_info_additional_images != 0 && $num_images > 0) {
  ?>
<div id="productAdditionalImagesScroll">
	<div id="productAdditionalImagesScroll-up">
	<a href="#" onclick="JsScroll('up','productAdditionalImages');return false;"><img src="<?php echo DIR_WS_TEMPLATE_IMAGES.'direction-up.png'?>"></a>
	</div>
	<div id="productAdditionalImages">
<?php 
if (!empty($list_box_contents)){
	foreach ($list_box_contents as $item){
		echo $item;
	}
}
?>
	</div>
	<div id="productAdditionalImagesScroll-down">
	<a href="#" onclick="JsScroll('down','productAdditionalImages');return false;"><img src="<?php echo DIR_WS_TEMPLATE_IMAGES.'direction-down.png'?>"></a>
	</div>
</div>
<script language="javascript">
function JsScroll(direction,id){
	if(direction=='up')
		var d = -100;
	else if(direction=='down')
		var d = 100;
	document.getElementById(id).scrollTop = document.getElementById(id).scrollTop+d;
}
$('#productAdditionalImages').css({'overflow':'hidden'});
</script>
<?php 
  }
?>